{ stdenv, lib ,gnumake}:
let
  fs = lib.fileset;
  sourceFiles = ./.;
in

fs.trace sourceFiles
stdenv.mkDerivation {
  name = "tproxy";
  src = fs.toSource {
    root = ./.;
    fileset = sourceFiles;
  };
  installPhase = ''
    mkdir -p $out/bin
    make install INSTALL_DIR=$out/bin
    chmod +x $out/bin/tproxy
  '';
  buildInputs = [gnumake];

  #postInstall = ''
  #  mkdir -p $out/bin
  #  make install INSTALL_DIR=$out/bin
  #  chmod +x $out/bin/tproxy
  #'';
}
